
import torch

class Params(object):
    def __init__(self):
        super(Params,self).__init__()
        self.DEVICE = torch.device("cuda" if torch.cuda.is_available() else 'cpu')
        self.BATCH_SIZE = 64
        self.TRAIN_FILE = "./data/train.txt"   # 训练集
        self.TEST_FILE = "./data/test.txt"  # 测试集

        self.SAVE_FILE = 'outputs/model.pt'  # 模型保存路径(注意如当前目录无save文件夹需要自己创建)
        self.LAYERS = 6  # encoder和decoder层数
        self.D_MODEL = 512  # embedding 维度
        self.D_FF = 1024  # feed forward第一个全连接层维数
        self.H_NUM = 8  # multi head attention hidden个数
        self.DROPOUT = 0.1  # dropout比例
        self.EPOCHS = 20
        self.MAX_LENGTH = 60
        self.SRC_VOCAB = 5493  # 英文的单词数
        self.TGT_VOCAB = 3194  # 中文的单词数
